/*
 * Field.h
 *
 *  Created on: 04-Sep-2014
 *      Author: ali
 */

#ifndef FIELD_H_
#define FIELD_H_

#include "vector"
#include "Node.h"
#include "Quarter.h"
#include <algorithm>

class Field
{
	int m_nLength;
	int m_Width;
	std::vector<Node> m_vectorSink;

	std::vector<Quarter> m_vectorQuarter;
public:
	Field(int nLen, int nWidth);
	void AddSensor(Node node);
	void AddSink(Node node);
	Node GetNearestSink(Quarter);
	bool SelectCH();
	bool SendData();
	int MultiHopIteration(int);

	void AddQuarter(Quarter quarter);
	const int GetLength();
	const int GetWidth();
	friend ostream & operator<<(ostream &out, Field& f);
	~Field();

}
;

#endif /* FIELD_H_ */
